<template>
  <div class="team-yq">
    <div class="fx">
      <div style="cursor:pointer">
        <van-image width="77" radius="4px" height="77" :src="shopInfo.piclink"  @click="toShops(shopInfo.id)"/>
      </div>
      <div class="fx im-cust-com fx_3">
        <div class="team-yq-text" >
          <p class="in-shop-title"  @click="toShops(shopInfo.id)">{{shopInfo.title}}</p>
          <p class="in-shop-price">
            <small>￥</small>
            {{shopInfo.price}}
          </p>
        </div>
        <div class="tr fx_3">
          <el-button size="mini" type="primary" round @click="toShops(shopInfo.id)">查看商品</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { Image } from "vant";
export default {
  name: "team-yq",
  props: {
    shopInfo: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {};
  },
  components: {
    [Image.name]: Image,
  },
  created() {},
  mounted() {},
  methods: {
    toShops(id) {
      let routeData = this.$router.resolve({
        path: "/pages/shop/shopdetail/shopdetail",
        query: { id: id },
      });
      window.open(this.$store.state.mobileWebSite + routeData.href, "_blank");
    },
  },
};
</script>
<style lang='less' scoped>
.team-yq {
  font-size: 14px;
  line-height: 1.2;
  min-width: 230px;
  > div {
    align-items: flex-start;
    text-align: left;
    color: #757272;
    justify-content: flex-start;
    .team-yq-text {
      margin-left: 10px;

      .in-shop-title {
        font-size: 14px;
        color: #000;
        word-break: break-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
        cursor: pointer;
      }
      .in-shop-price {
        font-size: 16px;
        font-weight: bold;
        color: #dd6f47;
      }
    }
  }
}
.im-cust-com {
  flex-direction: column;
  justify-content: space-between;
  min-height: 80px;
  flex: 3;
  align-items: flex-start;
  .tr {
    width: 100%;
    margin-top: auto;
  }
}
</style>
